{include file="admin/public/header" /}
<style type="text/css">
    #content-main{padding: 5px;}
</style>
<div class="aw-content-wrap">
    <div class="mod">
        <div class="mod-head">
            <ul class="nav nav-tabs">
                <li class="active"><a href="{:url('admin/user/job')}"><?php e('职位列表'); ?></a></li>
                <li><a href="#add" data-toggle="tab"><?php e('添加职位'); ?></a></li>
            </ul>
        </div>

        <div class="tab-content mod-body">
            <div class="tab-pane active" id="list">
            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th><?php e('职位名称'); ?></th>
                        <th><?php e('操作'); ?></th>
                    </tr>
                    </thead>
                    <tbody>
                    <form id="jobs_form" action="admin/ajax/save_job/" method="post" onsubmit="return false">
                    <?php if ($job) { ?>
                    <?php foreach ($job AS $v) { ?>
                    <tr>
                        <td>{$v.id}</td>
                        <td>
                            <div class="row">
                                <div class="col-sm-12">
                                    <input class="job-title form-control" type="text"  name="job_list{$v.id}" value="{$v.job_name}" />
                                </div>
                            </div>
                        </td>
                        <td><a  class="icon icon-trash md-tip" data-toggle="tooltip" title="<?php e('删除'); ?>"></a></td>
                    </tr>
                    <?php } ?>
                    <?php } ?>
                    </form>
                    </tbody>
                    <tfoot>
                    <tr>
                        <td colspan="3">
                            <input type="button" value="<?php e('保存设置'); ?>" class="btn btn-primary center-block"  />
                        </td>
                    </tr>
                    </tfoot>
                </table>
            </div>
            </div>

            <div class="tab-pane" id="add">
            <div class="table-responsive" style="padding-top:20px;">
                <form method="post" action="admin/ajax/add_job/" onsubmit="return false;" id="new_job_form" class="form-horizontal" role="form">
                    <div class="form-group">
                        <span class="col-sm-2 col-xs-3 control-label"><?php e('添加新职位'); ?>:</span>
                        <div class="col-sm-5 col-xs-8">
                            <textarea class="form-control textarea" name="jobs" rows="5" ></textarea>

                            <span class="help-block"><?php e('一行一个职位名称'); ?></span>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-5 col-xs-8">
                            <button type="button"  class="btn btn-primary"><?php e('保存设置'); ?></button>
                        </div>
                    </div>
                </form>
            </div>
            </div>
        </div>
    </div>
</div>
{include file="admin/public/footer" /}